var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
function writable(target, propertyName, desc) {
    desc.configurable = true;
    desc.writable = true;
}
function logParameter(target, propertyName, index) {
    console.log("logParameter");
    console.log(target);
    console.log(propertyName);
    console.log(index);
    var originalFn = target[propertyName];
    target.marker = "marker";
    target[propertyName] = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        console.log("sayHello called!");
        // args[index] = "你个棒槌！";
        // return originalFn.apply(this, args);
    };
}
var Employee = /** @class */ (function () {
    function Employee() {
    }
    Employee.prototype.sayHello = function (message) {
        console.log("hello " + message);
    };
    __decorate([
        writable,
        __param(0, logParameter)
    ], Employee.prototype, "sayHello", null);
    return Employee;
}());
var xmz = new Employee();
console.log(xmz.__proto__);
xmz.__proto__.sayHello.call(xmz, "boss");
xmz.sayHello("老大1");
xmz.sayHello("老大2");
xmz.sayHello("老大3");
